<template>
  <div class="assessment-change-plan-container">
    <div class="my-form-container">
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程名称：</div>
          <div class="my-form-item-value">{{ tableData.coursename }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程编号：</div>
          <div class="my-form-item-value">{{ tableData.coursenumber }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程类型：</div>
          <div class="my-form-item-value">{{ tableData.coursetype }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">学 时：</div>
          <div class="my-form-item-value">{{ tableData.classhour }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">学 分：</div>
          <div class="my-form-item-value">{{ tableData.credithour }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">培养层次：</div>
          <div class="my-form-item-value">{{ tableData.traininglevel }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">分 制：</div>
          <div class="my-form-item-value">
            <span>{{ tableData.scoretypecode }}</span>
            <span class="red-tip">变更为</span>
            <span>{{ tableData.scoretypecoder }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程考核一票否决：</div>
          <div class="my-form-item-value">{{ tableData.oneticketveto }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">授课对象：</div>
          <div class="my-form-item-value">{{ tableData.professionaldivisions }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">人 数：</div>
          <div class="my-form-item-value">{{ tableData.totalnumber }}人</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">开课教研室：</div>
          <div class="my-form-item-value">{{ tableData.teachingandresearchsection }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">教学班数：</div>
          <div class="my-form-item-value">{{ tableData.classes }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程负责人：</div>
          <div class="my-form-item-value">{{ tableData.coursemanager }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">授课教员：</div>
          <div class="my-form-item-value">{{ tableData.teachingfaculty }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课下作业成绩所占比例：</div>
          <div class="my-form-item-value">
            <span>{{ tableData.oldusualscoreratealter }}%</span>
            <span class="red-tip">变更为</span>
            <span>{{ tableData.usualscoreratealter }}%</span>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课堂测试成绩所占比例：</div>
          <div class="my-form-item-value">
            <span>{{ tableData.oldexamscoreratealter }}%</span>
            <span class="red-tip">变更为</span>
            <span>{{ tableData.examscoreratealter }}%</span>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">期中考试成绩所占比例：</div>
          <div class="my-form-item-value">
            <span>{{ tableData.oldmidtermscoreratealter }}%</span>
            <span class="red-tip">变更为</span>
            <span>{{ tableData.midtermscoreratealter }}%</span>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">期末考受成绩所占比例：</div>
          <div class="my-form-item-value">
            <span>{{ tableData.oldexperimentscoreratealter }}%</span>
            <span class="red-tip">变更为</span>
            <span>{{ tableData.experimentscoreratealter }}%</span>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">期末考试方式：</div>
          <div class="my-form-item-value">
            <span>{{ tableData.oldfinalexaminationalter }}</span>
            <span class="red-tip">变更为</span>
            <span>{{ tableData.finalexaminationalter }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">场地需求：</div>
          <div class="my-form-item-value">
            <span>{{ tableData.oldsitudemandalter }}</span>
            <span class="red-tip">变更为</span>
            <span>{{ tableData.situdemandalter }}</span>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item" style="height: 278px; border: none">
        <el-col :span="24">
          <div class="my-form-item-label">考核设计：</div>
          <div class="my-form-item-value assessment-design">
            <el-input
              type="textarea"
              :rows="10"
              style="width: 678px"
              v-model="tableData.oldassessmentdesignalter"
              disabled="true"
            ></el-input>
            <span class="red-tip">变更为</span>
            <el-input
              type="textarea"
              v-model="tableData.assessmentdesignalter"
              :rows="10"
              style="width: 678px"
              disabled="true"
            ></el-input>
          </div>
        </el-col>
      </el-row>
    </div>
    <!--    <div class="button-group">
          <el-button
            class="btn"
            type="text"
            @click="addApply(tableData.planid)"
          >保存</el-button
          >
          <el-button
            class="btn"
            type="text"
            @click="applySubmit(tableData.planid)"
          >保存并提交</el-button
          >
        </div>-->
  </div>
</template>

<script>
import {getAssDetail} from "../../../api/courseExame/courseExa";

export default {
  data() {
    return {
      tableData: [{
        modifyid: "1470245923550801921",
        department: "计算机系",
        teachingandresearchsection: "计算机教研室",
        coursenumber: "658545",
        coursename: "计算机基础课",
        coursetype: "必修",
        traininglevel: "大专",
        coursemanager: "王老师",
        teachingfaculty: "李教员*",
        classhour: "",
        credithour: "",
        grade: "2021级",
        classes: "教学一班",
        professionaldivisions: "",
        totalnumber: "30人",
        scoretypecoder: "百分制1",
        usualscoreratealter: "10%",
        examscoreratealter: "10%",
        midtermscoreratealter: "20%",
        experimentscoreratealter: "30%",
        oneticketveto: "是",
        oldassessmentdesignalter: "20",
        oldexamscoreratealter: "23",
        oldexperimentscoreratealter: "33",
        oldfinalexaminationalter: "测试",
        oldmidtermscoreratealter: "343",
        oldsitudemandalter: "34",
        oldusualscoreratealter: "3",
      }]
    };
  },
  created() {
    this.getOldPlanDetail();
  },
  methods: {
    getOldPlanDetail() {
      getAssDetail(this.$route.query.cId).then(res => {
        console.log("输出dui", this.$route.query.cId);
        this.tableData = res.data.data;
        console.log("输出dui", res.data.data);
      })
    },
    open(str) {

      this.$confirm(str, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$message({
          type: 'success',
          message: '保存成功!'
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消保存'
        });
      });
    }

  },
};
</script>
<style lang="less" scoped>
.assessment-change-plan-container {
  .assessment-design {
    .el-textarea__inner {
      resize: none;
      font-size: 16px;
      color: rgba(0, 76, 167, 1);
    }
  }
}
</style>
<style scoped lang="less">
.assessment-change-plan-container {
  .red-tip {
    color: red;
    margin: 0 14px;
  }

  .assessment-design {
    padding: 13px 9px !important;

    .el-textarea__inner {
      resize: none;
    }

    .red-tip {
      margin: 0 7px;
      display: inline-block;
      vertical-align: 105px;
    }
  }

  .button-group {
    text-align: center;

    .btn {
      display: inline-block;
      font-size: 18px;
      padding: 6px 22px;
      border-radius: 6px;

      &:nth-child(1) {
        color: #f3b815;
        border: 1px solid #f3b815;
        background: #fff6ef;
        margin-right: 139px;
      }

      &:nth-child(2) {
        color: #02c86c;
        border: 1px solid #02c86c;
        background: #f1fff8;
      }
    }
  }
}
</style>
